package com.ymy.thinking.in.spring.bean.entity;

/**
 * {@link Person} 类 测试以下方式实例化Bean
 * <li>Factory (static)</li>
 * <li>{@link org.springframework.beans.factory.FactoryBean} </li>
 *
 * @author Ringo
 * @date 2021/8/25 20:54
 */
public class Person {

    private String name;

    private Integer age;

    public static Person create() {
        Person person = new Person();
        person.setName("Ringo");
        person.setAge(18);
        return person;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
